set the member of sprite the spriteNum of me to member the DownCM of me
set the button_active of me to 1
end
on mouseUp me
set the member of sprite the spriteNum of me to member the UpCM of me
set the button_active of me to 0
end
on mouseEnter me
if the button_active of me then
set the member of sprite the spriteNum of me to member the DownCM of me
end if
end
on mouseLeave me
if the button_active of me then
set the member of sprite the spriteNum of me to member the UpCM of me
end if
end
on mouseUpOutSide me
set the button_active of me to 0
end
on beginSprite me
set the UpCM of me to the member of sprite the spriteNum of me
set the UpNum of me to the number of member UpCM
set the DownNum of me to the number of member DownCM
set the button_active of me to 0
end
on endSprite me
end
on getPropertyDescriptionList
if the currentSpriteNum = 0 then
set memdefault to 0
else
set memref to the member of sprite the currentSpriteNum
set castLibNum to the castLibNum of memref
set memdefault to member (the memberNum of member memref + 1) of castLib castLibNum
end if
set p_list to [#DownCM: [#comment: "Hilite Image:", #format: #graphic, #default: memdefault]]
return p_list
end
on getBehaviorDescription
return "Makes a sprite work as a pushbutton with automatic highlighting and mouse tracking. The sprite's initial castmember represents the button's normal state." & RETURN & "PARAMETERS:" & RETURN & "ΓÇó Hilite Image - Choose the cast member to display when the button is pressed. The default value is the cast member immedietly following the sprite's current cast member."